/**
 * @file battery_error.h
 * @brief 
 * @author Tome (baojian.liu-a1105@aqara.com)
 * @date 2021-04-22
 */
 
// include 


#ifdef _lm_header_files_h_
#define BATTERY_ERROR_H


#error "remove this .h file from lm_header_files.h!"

/*
NOTE:
 this file shouldn't be included in "lm_header_files.h", if use both this and "....files.h",
 make sure this file before "....files.h", eg
 
 #include "lm_log_xxxx.h"           //line 1
 #include "lm_header_files.h"       //line 2

*/

#endif
 

#ifndef BATTERY_ERROR_H
#define BATTERY_ERROR_H
 
 
 
/****************************************************************************************************************************** 
                                                            const
*******************************************************************************************************************************/












/****************************************************************************************************************************** 
                                                            typedef
*******************************************************************************************************************************/

typedef enum {
    
    /* FOR PRODUCTION */
    ENUM_VALUE(PROD_COD_SN = 2),
    ENUM_VALUE(PROD_COD_DATE),
    ENUM_VALUE(PROD_COD_CELLINFO),
    ENUM_VALUE(PROD_COD_MANU),
    ENUM_VALUE(PROD_COD_SECCODE),
    ENUM_VALUE(PROD_COD_INSTALL),
    
    /*  FOR  sale service    */
    ENUM_VALUE(WARN_COD_TEMPHIGH = 13),
    ENUM_VALUE(WARN_COD_TEMPLOW),
    ENUM_VALUE(WARN_COD_CHGERR),        // OHTER
    
    ENUM_VALUE(WARN_COD_CELLTEMPLOW),
    ENUM_VALUE(WARN_COD_CELLTEMPHIGH),
    
    ENUM_VALUE(WARN_COD_SOCHOLD),
    ENUM_VALUE(WARN_COD_CHGTIMEOUT),
    
    ENUM_VALUE(WARN_COD_CHIP_STV_ERR),
    ENUM_VALUE(WARN_COD_CHIP_INIT_FAIL),
    ENUM_VALUE(WARN_COD_CHIP_DATA_ERR),
    ENUM_VALUE(WARN_COD_CHIP_COM_ERR),
    ENUM_VALUE(WARN_COD_CHIP_INT_ERR),
    
    ENUM_VALUE(WARN_COD_VOLHIGH),
    ENUM_VALUE(WARN_COD_VOLLOW),
    
    ENUM_VALUE(WARN_COD_USB_UNSTABLE),
    
    
    
    ENUM_VALUE(WARN_COD_FRAME_FORMAT),
    ENUM_VALUE(WARN_COD_FRAME_LONG),
    ENUM_VALUE(WARN_COD_FRAME_SHORT),
    
}battery_error_e;









/****************************************************************************************************************************** 
                                                            MICRO
*******************************************************************************************************************************/







/****************************************************************************************************************************** 
                                                            declearation
*******************************************************************************************************************************/


extern void task_brain_set_warn_code(uint8 code);

extern void task_brain_clear_warn_code(uint8 code);









#endif //BATTERY_ERROR_H
